home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-08-12 | 2.0 KB | 91 lines | [TEXT/CWIE] |
- ////////////////////////////////
- //
- // TSBuildBlock.h
- //
- // © 1994, 1995, 1996, 1997 Tangent Systems
- //
- // All rights reserved.
- //
- // This file contains confidential and proprietary information. No Portion
- // of this file may be reproduced, by any means, without the written
- // permission of Tangent Systems
- //
- // Tangent Systems makes no representation or warranties about the suitibility of the software,
- // either express or implied, including but not limited to the implied warranties of merchantability,
- // fitness for a particular purpose, or non-infringment.
- //
- // Tangent Systems shall not be liable for any damages suffered by licensee as a result of using,
- // modifying or distributing this software or derivatives.
- //
- // Description:
-
- //
- //
- // Author: John H. Shackelford, Tangent Systems
- // email: jshack@tangentsys.com
- //
- // Date: 1997/06/20
- // Version: A
- //
- // Revision History:
- // 1997/06/20 Revision A - Initial Release
- //
- ////////////////////////////////
-
- #ifndef _TSBuildBlock_h
- #define _TSBuildBlock_h
-
- #include "BSMath.h"
- #include "BSErrorCodes.h"
- #define MAX_INPUTS 20
-
-
- //typedef short bool;
- #ifndef TRUE
- #define TRUE 1
- #define FALSE 0
- #endif
-
-
- //class TSBuildBlock;
-
- class TSBuildBlock
- {
- protected:
- // Attributes
- TSBuildBlock* InputBlocks[MAX_INPUTS];
- short InputsCount;
- short MaxInputs;
- Real StartTime;
- Real Output;
- Real SampleInterval;
- bool PrintOutput;
- char* Name;
-
- // Methods
- TSBuildBlock();
- ~TSBuildBlock();
-
- public:
- virtual int connectBlock(TSBuildBlock* aBlock);
- virtual int doSimInitialize();
- virtual int doSimTerminate();
- virtual int doSimPause();
- virtual int doSimulate(Real time);
- short getInputsCount();
- void enableOutputPrinting();
- void disableOutputPrinting();
- void printOutput();
- void setOutput(Real value);
- void setMaxInputs(int value);
- void setInputsCount(short n);
- void incInputsCount();
- void setSampleInterval(Real sInterval);
- void setName(char* bName, int len);
- char* getName();
- TSBuildBlock* giveNthInput(int n);
- Real getNthInput(int n);
- Real giveOutput();
-
- };
- #endif